package com.ruoyi.applet.service.impl;

import com.ruoyi.applet.domain.Goods;
import com.ruoyi.applet.domain.UsrBrowseTime;
import com.ruoyi.applet.domain.vo.UsrLikeBrowse;
import com.ruoyi.system.api.domain.User;
import org.springframework.stereotype.Service;
import com.ruoyi.applet.mapper.UserMapper;
import com.ruoyi.applet.domain.UserLogin;
import com.ruoyi.applet.service.IUserService;

import javax.annotation.Resource;
import java.util.List;

/**
 * 用户信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-11-12
 */
@Service
public class UserServiceImpl implements IUserService 
{

    @Resource
    private UserMapper userMapper;

    @Override
    public User selectUsrPhoneANDPassword(String usrPhone, String usrPassword) {
        return userMapper.selectUsrPhoneANDPassword(usrPhone, usrPassword);
    }

    @Override
    public Boolean insertAllBoolean(UserLogin user) {
        return userMapper.insertAllBoolean(user);
    }

    @Override
    public Integer selectAllByUerNameInteger(String usrName) {
        return userMapper.selectAllByUerNameInteger(usrName);
    }

    @Override
    public Integer selectByUsrPhoneInteger(String usrPhone) {
        return userMapper.selectByUsrPhoneInteger(usrPhone);
    }

    @Override
    public Integer selectAllByUsrIdLikeInteger(Long usrId) {
        return userMapper.selectAllByUsrIdLikeInteger(usrId);
    }

    @Override
    public Integer selectAllByUsrIdBrowseInteger(Long usrId) {
        return userMapper.selectAllByUsrIdBrowseInteger(usrId);
    }

    @Override
    public List<UsrLikeBrowse> selectAllByUsrIdLikeList(Long usrId) {
        return userMapper.selectAllByUsrIdLikeList(usrId);
    }

    @Override
    public List<UsrBrowseTime> selectAllByBrowseTime(Long usrId) {
        return userMapper.selectAllByBrowseTime(usrId);
    }

    @Override
    public List<UsrLikeBrowse> selectAllByUsrIdBrowseList(Long usrId) {
        return userMapper.selectAllByUsrIdBrowseList(usrId);
    }

    @Override
    public Boolean deleteByUsrIdBoolean(Long goodsId) {
        return userMapper.deleteByUsrIdBoolean(goodsId);
    }

    @Override
    public Boolean deleteByGoodsIdBoolean(Long usrId,Long goodsId) {
        return userMapper.deleteByGoodsIdBoolean(usrId,goodsId);
    }

    @Override
    public Integer selectAllByUsrIdAndGoodsId(Long usrId, Long goodsId) {
        return userMapper.selectAllByUsrIdAndGoodsId(usrId, goodsId);
    }

    @Override
    public User selectByUsrName(String nikeName) {
        return userMapper.selectByUsrName(nikeName);
    }

    @Override
    public Integer insertUserLikeGoods(Long usrId, Long goodsId) {
        return userMapper.insertUserLikeGoods(usrId, goodsId);
    }

    @Override
    public Integer deleteAll(Long usrId) {
        return userMapper.deleteAll(usrId);
    }

    @Override
    public User selectUsrIdUser(Long usrId) {
        return userMapper.selectUsrIdUser(usrId);
    }
}
